package com.dai.zhenfujin.adapter;

import android.content.Context;
import android.view.View;

import com.dai.zhenfujin.BaseAdapter.BaseRecycleAdapter;
import com.dai.zhenfujin.BaseAdapter.BaseViewHolder;
import com.dai.zhenfujin.R;
import com.dai.zhenfujin.bean.TypeListBean;

import java.util.List;

public class IssueTypeAdpter2 extends BaseRecycleAdapter<TypeListBean.TypelistBean> {
    private List<TypeListBean.TypelistBean> dataList;
    private Context mContext;
    private BaseViewHolder.onItemCommonClickListener commonClickListener;


    public IssueTypeAdpter2(Context context, List<TypeListBean.TypelistBean> dataList, BaseViewHolder.onItemCommonClickListener commonClickListener) {
        super(context, dataList, com.dai.zhenfujin.R.layout.itme_issue_list);
        this.dataList = dataList;
        this.commonClickListener = commonClickListener;
        mContext = context;
    }

    @Override
    public void bindData(BaseViewHolder holder, TypeListBean.TypelistBean data) {
        if (!data.getT_name().equals("招亲")) {
            holder.getView(R.id.tv_city).setVisibility(View.VISIBLE);
            holder.setText(com.dai.zhenfujin.R.id.tv_city, data.getT_name())
                    .setCommonClickListener(commonClickListener);
            holder.getView(R.id.iv_type).setVisibility(View.GONE);
        }else {
            holder.getView(R.id.iv_type).setVisibility(View.GONE);
            holder.getView(R.id.tv_city).setVisibility(View.GONE);
        }
       /* holder.setText(com.dai.zhenfujin.R.id.pp_adapter_bloc, data.user_company);
        holder.setText(com.dai.zhenfujin.R.id.pp_adapter_position, data.user_duties);
        holder.setText(com.dai.zhenfujin.R.id.item_word_type, data.user_job);*/
        //  Glide.with(mContext).load(data.getT_url()).into((ImageView) holder.getView(com.dai.zhenfujin.R.id.iv_type));
    }
}
